package example.directoryoperation.p11;

import java.io.File;

/**
 * @author 17976
 */
public class Main {  public static void main(String[] args) {
    File dir = new File("C:");
    String[] children = dir.list();
    if (children == null) {
        System.out.println( "目录不存在或它不是一个目录");
    }
    else {
        for (int i=0; i< children.length; i++) {
            String filename = children[i];
            System.out.println(filename);
        }
    }
}
}
